back to home

Home

Setting Up Neovim

Why

I have been using vim keybindings in VSCode for a couple months and have gotten really nerdy about it. I have found sticking to the keyboard and ditching the mouse very rewarding for speed and feeling more like a 'hacker'. I find using the keybindings is great because I can perform an action without much effort since I know the commonly used macros decently well. The move to using vim in the terminal was inevitable for me and Neovim is what interested me the most due to it's documentation and plugin ecosystem.

Lazy.nvim

Thankfully I knew that I would want a plugin manager to setup my environment going into project. I chose Lazy.nvim since I had seen it mentioned before in my research into nvim setups and it seemed like a popular choice with an active community. I have not fully utilized the lazy loading aspects of the manager but plan to slowly evolve my setup as I work with it; that way it moves towards a personalized workable tool.

The Monolith init File

My first attempt at writing out my Lua based configuration was in a single monolith file of plugins and configurations. (This was not manageable at all...) It was inconvenient to find sections within the file and the organization was irritating.

I would recommend starting with a plan to partition the configurations of the plugins and have a minimal init.lua entry point into your nvim setup if you ever try it out.

Reorganizing

I decided that it would be best to start my configuration from the ground up after realizing that the monolith was not going to cut it. So, I gradually rebuilt my configuration over a couple hours; even changing up a couple plugins and how I wanted my nvim experience to feel. I found that I did not like using a side panel to see my tree structure using nvim_tree and much preferred using telescope with fuzzy finding to find and open files. For the times I want to do directory manipulation in Neovim and not the terminal I setup the Oil plugin. Oil allows directories to be edited as text, helpful for adding, removing, and renaming directories and files all at once.

Resources and Citations

I used a lot, and I mean a lot, of resources to successfully accomplish getting any of this working. Here is a list of the most useful resources I found. There are more I used but these where the main spots I went to during the process.

Conclusion

Getting my own Neovim setup together was a great learning experience! I have a better understanding of how vim works under the hood with buffers , though there is always more to learn. I am also more comfortable with creating custom commands and macros for shortcuts and custom plugin bindings. I even learned a bit of the Lua syntax so I could write a header creation macro.

When building back my setup I added a start screen using the Alpha plugin, and for fun I made a custom starting logo based on the Skyrim you're finally awake meme:

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░░░░░░░░░░░░░░▒▒░▒▒▒▒▒▒▒▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░▒░▒▒░▒▒▒▒▒▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒░░░░░░░░░░▒▒░░░░░░░░░░░░░▒░▒▒▒▒▒▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▒▒░░░░░░░░░░░░░▓▒░░░░░░░░▒░░░▒▒▒▒▒▒▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▒░░░░░░░░░░░░░░░░▓▓░░░░░░░▒░▒▒▒░░▒▒░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▒▒░░░░░░░░▒▓▓▓▒▒░░░▓▓▒▒▒░░░░░▒▒░░░░░░▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓▒▒▒▒▒▒▒▒░░▒▒▒░░░░░▒▓▒▒▒▒░░░░░░░░░░░▒▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓▓▓▓▓▓▓▓▒░░░░░░░░░░░▒▓▒▒▒▒░░░░░░░░░░▒▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▒▒▒▒░░░░░░░░░░░▒▓▒▒▒▒░░░░░░░░░░▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓▓▓▒▒▒▒▒▒▒▒▒▒░▒▒▒░░▒▒▒▓▒▒▒▒▒▒▓▓▒▒▒▒▒▒
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▒▓▓▓▒▒▒▓▓▓▒▒▓▓░░░▒▒▓▒▓▒▒▒▓▓▒▓▓▓▓▓▓▓▓
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▒▓▓▓▒▓▓▓▓▓▒░░░░░▒▓▓▒▒▓▒▒▓▓▓▒▓▓▓▒▓▓▓
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓▒░▓▓▓▓▒▒▒▒▒▒▒░░▒▓▒▒░▒▓▓▓▓▓▓▓▒▒▒▓▓▓
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▒▒▓▓▓▓▓▓▒▒▒▓▒▒▓▓▒▒▒░░▒▓▓▓▓▓▓▓▒▓▓▓▓
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▒▒▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒░░▒▓▓▒▓▓▓▓▒▓▓▓▓
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓▒▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▓▓▒▓▓▓▓▓▓▓▓▓
 ╖ ╖╔═╕╖ ╖    ╖ ╖╔═╗╖ ╖    ░░░░░░▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▒▓▓▓▓▓▓▓
 ╠═╣╠═╕╚╦╝    ╚╦╝║ ║║ ║    ░░░░▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
 ╜ ╜╚╧╛ ╜  ╕   ╜ ╚╧╝╚╧╝ ╕  ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
╖ ╖╔═╗╖ ╖╛╔═╗╔═╕  ╔═╕╖╔═╗╔═╗╖  ╖ ╖ ╖  ╖╖╖╔═╗╖╒╦╕╖╔═╗╔═╗  ╔═╗╔═╗╔═ ╔═╕
╚╦╝║ ║║ ║ ╠╦╝╠═╕  ╠═╡║║ ║╠═╣║  ║ ╚╦╝  ║║║╠╦╝║ ║ ║║ ║║╘╗  ║  ║ ║║ ║╠═╡
 ╜ ╚╧╝╚╧╝ ╜╙ ╚╧╛  ╜  ╜╜ ╜╜ ╜╚═╛╚═╛╜   ╚╩╝╜╙ ╜ ╜ ╜╜ ╜╚╧╝  ╚╧╝╚╧╝╚╧ ╚╧╛

My setup, (which I do not recommend using directly,) is on Github if you would like to peruse it.

Best,
- Nick